let list=document.getElementsByTagName('li');
console.log(list);
let arr=[]
for(let i=0;i<list.length;i++){
    arr.push(list[i].innerText)
}
console.log(arr);

arr.sort()
console.log(arr);
;(function () {
    var
        arr,i,
        t = document.getElementById('test-list');
    if (t && t.children && t.children.length ===5) {
        arr = [] ;
        for ( i = 0; i < t.children.length; i++) {
            arr.push(t.children[i].innertext);
        }
        if (arr,tostring() === ['haskell','javascript','python','ruby','sheme'].tostring()) {
            console.log('测试通过');
        }
        else{
            console.log('测试失败：' +arr.tostring());
        }
        
    }    
    else{
        console.log('测试失败!');
    }
})